<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/tiers.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTiersTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="6">
                    <h:outputLabel value="#{bundle.CreateTiersLabel_nomTiers}" for="nomTiers" />
                    <p:inputText id="nomTiers" required="true" value="#{tiersController.selected.nomTiers}" title="#{bundle.CreateTiersTitle_nomTiers}" />
                    <p:message for="nomTiers"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_codeInterneTiers}" for="codeInterneTiers" />
                    <p:inputText id="codeInterneTiers" value="#{tiersController.selected.codeInterneTiers}" title="#{bundle.CreateTiersTitle_codeInterneTiers}" />
                    <p:message for="codeInterneTiers"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_categorie}" for="categorie" />
                    <p:selectOneMenu id="categorie" value="#{tiersController.selected.categorie}" title="#{bundle.CreateTiersTitle_categorie}" >
                        <f:selectItems value="#{categorieTiersController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="categorie"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_typeTiers}" for="typeTiers" />
                    <p:selectOneMenu id="typeTiers" value="#{tiersController.selected.typeTiers}" title="#{bundle.CreateTiersTitle_typeTiers}" >
                        <f:selectItems value="#{typeTiersController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="typeTiers"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_capital}" for="capital" />
                    <p:inputText id="capital" value="#{tiersController.selected.capital}" title="#{bundle.CreateTiersTitle_capital}" />
                    <p:message for="capital"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_effectif}" for="effectif" />
                    <p:inputText id="effectif" value="#{tiersController.selected.effectif}" title="#{bundle.CreateTiersTitle_effectif}" />
                    <p:message for="effectif"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_tva}" for="tva" />
                    <p:selectBooleanCheckbox id="tva" value="#{tiersController.selected.tva}"/>
                    <p:message for="tva"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_numTVA}" for="numTVA" />
                    <p:inputText id="numTVA" value="#{tiersController.selected.numTVA}" title="#{bundle.CreateTiersTitle_numTVA}" />
                    <p:message for="numTVA"/>
                    <h:outputLabel value="#{bundle.CreateTiersLabel_logo}" for="logo" />
                    <p:selectOneMenu id="logo" value="#{tiersController.selected.logo}" >
                        <f:selectItems value="#{logosController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="logo"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{tiersController.create}" value="#{bundle.CreateTiersSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{tiersController.prepareList}" value="#{bundle.CreateTiersShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
